‹#›
Autodesk Inventor 定制开发在线培训 2010
•x86 (32 位)
§选择“Register for COM interop”，由 Visual Studio 自动完成注册
§也可以手动注册：C:\Windows\Microsoft.NET\Framework\v2.0.50727\regasm.exe
§
•
•
•x64 (64 位)
§因为 Visual Studio 是 32 位的，它只会注册 32 位的插件程序
§必须手动执行注册操作 ：C:\Windows\Microsoft.NET\Framework64\v2.0.50727\regasm.exe
§
§
§
§
•插件注册
@echo off
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase MyAddIn.dll
PAUSE
@echo off
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase MyAddIn.dll

| To register the Add-In you need to run the regasm utility. Here’s an example of its use. The /codebase option is required in order to correctly register the Add-In.
| RegAsm.exe /codebase MyAddIn.dll
| RegAsm.exe for Windows 32 bit is installed by Visual Studio in the directory:
| C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
| For 64 bit Windows it is installed in:
| C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
| You can also use RegAsm to unregister your Add-In. To make this process easier you can create four small .bat files;
| Register32.bat
| @echo off
| C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /codebase MyAddIn.dll
| PAUSE
| Register64.bat
| @echo off
| C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase MyAddIn.dll
| PAUSE
| Unregister32.bat
| @echo off
| C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe /u MyAddIn.dll
| PAUSE
| Unregister64.bat
| @echo off
| C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /u MyAddIn.dll
| PAUSE